///////////////////////////////////////////////////////////////////////////////
//
// lighthouse3D - 3D Software Library
//
// File: lh3dappmain.h
//
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2003-2013 Marcus Reinhardt
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//
///////////////////////////////////////////////////////////////////////////////
//
// You can find a copy of the GNU General Public License (gpl.txt) in the
// directory of the library.
//
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
//
// This file is the starting point for a new application using lighthouse 3D
//
///////////////////////////////////////////////////////////////////////////////

#include "C3DLibrary.h"

// Global structs

// Define library setup by the lh3d application
struct TAppLibrarySetup {
  unsigned char renderMode;
  unsigned char shadingMode;
  unsigned char lightingMode;
  unsigned char fsaaliasMode;
  unsigned char bfcullingMode;
  unsigned char texFilterMode;
  unsigned int  screenHeight;
  unsigned int  screenWidth;
  unsigned int  nrWorkerThreads;
};

// Tell appication infos about its environment
struct TEnvInformation {
  unsigned char  systemType;
  unsigned int   nrCPUCores;
#ifdef __MULTI_CORE_SUPPORT
  unsigned int   nrWorkerThreads;
#endif
};

// Global defines
#define __SYSTEM_TYPE_NULL		0
#define __SYSTEM_TYPE_WIN32		1
#define __SYSTEM_TYPE_LINUX		2

#define __CPU_CORES_SINGLE      0x0000
#define __CPU_CORES_MULTI       0xFF00

// Function Interface
TAppLibrarySetup  *lh3dappmain_event_setup(TEnvInformation *tEI);
unsigned char      lh3dappmain_event_init(C3DLibrary *pLibReference);
unsigned char      lh3dappmain_event_task(void);
unsigned char      lh3dappmain_event_resize(int width, int height);
unsigned char      lh3dappmain_event_mousechanged(int leftMousePressed, int middleMousePressed, int rightMousePressed, int horzPos, int vertPos);

